builder: Fix parsing of mixed declarations
authorMatthias Clasen <mclasen@redhat.com>
Fri, 24 Sep 2021 20:34:48 +0000 (16:34 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 27 Sep 2021 21:47:24 +0000 (17:47 -0400)
commitec624029089d0e9ffc4d1b759b15e0983fb87f1d
treea170e5d54d9967c2b072e2b1b54c202fd3631b86
parentc8f29a689d0721cc9ffb485073c4f999c6585385
builder: Fix parsing of mixed declarations

The GtkBuilder parser constructs the object e.g.
when handling a <binding> element. There may be
more <property> elements after it, which we were
just not applying. Fix that by always applying
property when we see </object>. To do that, we
need to track the applied status per property.

Test included.

Fixes: #4208
gtk/gtkbuilder.c
gtk/gtkbuilderparser.c
gtk/gtkbuilderprivate.h
testsuite/reftests/late-property.ref.ui [new file with mode: 0644]
testsuite/reftests/late-property.ui [new file with mode: 0644]
testsuite/reftests/meson.build